#include <stdio.h>
  
  
  int count_bit_one(unsigned int n)
{
    int i = 0;
    int count = 0;
  for(i=0;i<32;i++)
  {
  	
  	if( (n >> i) & 1 == 1)
  	{
  		count++;
	  }
  	

   }
  	return count;
  	
  
}
   
 int main()
 {
 	int num = 0;
 	scanf("%d",&num);
    int ret = count_bit_one(num);
 	  printf("%d",ret);
 	  return 0;
  } 
